<?php
/**********************************INCLUDE*********************************** *
* **************************************************************************** */
// TODO: includes -nm

/**
 * Used to manage information about an account.
 *
 * @author nicholas malacarne <nicholas.malacarne@gmail.com>
 */
class Account {
    
    // account data -nm
    private $data;
    
    // constructor -nm
    public function __construct( array $aData ){
        
        $this->data = $aData;
        
    } // end constructor -nm
    
    // destructor -nm
    public function __destruct() {
        
        $this->data = NULL;
        
    } // end destructor -nm
    
    // get property -nm
    public function __get( $key ){
        
        // return property value -nm
        if ( array_key_exists( $key, $this->data ) ){
            
            return $this->data[ $key ];
            
        }else{
            
            throw new InvalidArgumentException( "Key not found !" );
        }
        
    } // end method -nm
    
    // get account info -nm
    public function getInfo(){
        
        // copy data array -nm
        $info = $this->data;
        
        return $info;
    }
    
} // end class -nm
